package com.coding.kan_yi_dao.configs;


import com.coding.kan_yi_dao.interceptor.LoginValidateInterceptor;
import com.coding.kan_yi_dao.interceptor.RefreshTokenExpireInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyMvcConfigure implements WebMvcConfigurer {
    @Autowired
    private LoginValidateInterceptor loginValidateInterceptor;
    @Autowired
    private RefreshTokenExpireInterceptor refreshTokenExpireInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(refreshTokenExpireInterceptor).excludePathPatterns("");
        registry.addInterceptor(loginValidateInterceptor).addPathPatterns("");
    }
}
